<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8"/>
    <title>数据导入日志</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <link rel="stylesheet" href="../layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../style/admin.css" media="all"/>
    <link rel="stylesheet" href="../style/home.css" media="all"/>
    <style type="text/css">
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            border: 0px;
            overflow: hidden;
            /* overflow-x: scroll; */
        }

        .layui-input {
            height: 28px;
        }
    </style>
</head>

<body layadmin-themealias="default">
<div class="layui-fluid">
    <div class="layui-card" style="height: 100%; padding: 0px;">
        <div class="layui-card-body">
            <div class="layui-fluid" style="padding: 0px;">
                <table class="layui-table" id="dataTable" lay-type="post"></table>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="resultTpl">
    {{#  if(d.result === "失败"){ }}
    <span style="color:  #FF5722;">失败</span>
    {{#  } else if(d.result === "成功"){ }}
    <span style="color: #2F4056;">成功</span>
    {{#  } }}
</script>
<script src="../layui/dasui.js"></script>
<script type="text/javascript" src="../js/lib/watermark.js"></script>
<script>
    layui.use(['form', 'table', 'laydate'], function () {
        var form = layui.form;
        var $ = layui.$;
        var table = layui.table,
            laydate = layui.laydate;

        table.render({
            elem: '#dataTable'
            , url: '/log/getDataImportLog?pid=[[${pid}]]'
            , height: 'full-60'
            , loading: true
            , even: true
            , size: 'sm'
            , type: 'post'
            , cellMinWidth: 60
            , cols: [
                [
                    {field: 'idx', title: '顺序号', width: '100'},
                    {field: 'result', title: '结果', width: '100', templet: '#resultTpl'},
                    {field: 'info', title: '信息', width: '550'}
                ]
            ]
            , page: true
            , limit: 50
            , loading: true
        });

    });

</script>
</body>

</html>